DFBUGS-6865: Fix PVC leftover issue for non-discovered apps#769
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: raaizik The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@raaizik: This pull request references [Jira Issue DFBUGS-6865](https://redhat.atlassian.net/browse/DFBUGS-6865), which is invalid:
Comment DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
325f827 to
4608561
Compare
During VRG deletion, DisownVolSyncManagedPVC was removing all ownerReferences from PVCs instead of just the VRG owner. This conflicted with the skipPVCDisownership=true flag used during cleanup, breaking Kubernetes garbage collection for non-discovered apps that have the do-not-delete-pvc annotation. The PVC should have two owners: VRG and VolSync resource (RS/RD). PR RamenDR#2242 correctly preserves RS/RD ownership during cleanup via skipPVCDisownership=true. However, DisownVolSyncManagedPVC() was removing all owners when the annotation is present, undermining this protection. This fix makes DisownVolSyncManagedPVC() remove only the VRG ownerReference, aligning with skipPVCDisownership=true and allowing Kubernetes garbage collection to properly clean up PVCs when VolSync resources are deleted. This resolves PVC leftover issues in three scenarios: - Failover followed by application deletion - Relocate followed by application deletion - Direct application deletion after DR enablement Fixes: DFBUGS-6865 Related: DFBUGS-6325, PR RamenDR#2504, PR RamenDR#2242 Signed-off-by: raaizik <132667934+raaizik@users.noreply.github.com> (cherry picked from commit 901f68a)
4608561 to
58dc73a
Compare
|
/jira refresh |
|
@raaizik: This pull request references [Jira Issue DFBUGS-6865](https://redhat.atlassian.net/browse/DFBUGS-6865), which is invalid:
Comment DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@raghavendra-talur I re-ran the failing jobs without success. It's a 4.21 branch issue. |
|
/jira refresh |
|
@raaizik: This pull request references [Jira Issue DFBUGS-6865](https://redhat.atlassian.net/browse/DFBUGS-6865), which is invalid:
Comment DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@raaizik: This pull request references [Jira Issue DFBUGS-6865](https://redhat.atlassian.net/browse/DFBUGS-6865), which is invalid:
Comment DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@raaizik: This pull request references [Jira Issue DFBUGS-6865](https://redhat.atlassian.net/browse/DFBUGS-6865), which is valid. 3 validation(s) were run on this bug
DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
During VRG deletion, DisownVolSyncManagedPVC was removing all ownerReferences from PVCs instead of just the VRG owner. This conflicted with the skipPVCDisownership=true flag used during cleanup, breaking Kubernetes garbage collection for non-discovered apps that have the do-not-delete-pvc annotation.
The PVC should have two owners: VRG and VolSync resource (RS/RD). PR RamenDR#2242 correctly preserves RS/RD ownership during cleanup via skipPVCDisownership=true. However, DisownVolSyncManagedPVC() was removing all owners when the annotation is present, undermining this protection.
This fix makes DisownVolSyncManagedPVC() remove only the VRG ownerReference, aligning with skipPVCDisownership=true and allowing Kubernetes garbage collection to properly clean up PVCs when VolSync resources are deleted.
This resolves PVC leftover issues in three scenarios:
Fixes: DFBUGS-6865
Related: DFBUGS-6325, PR RamenDR#2504, PR RamenDR#2242
(cherry picked from commit 901f68a)